package day1601;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class colls {
    public static void main(String[] args) {
        List<Integer> a = new ArrayList<>();
        List<Integer> b = new ArrayList<>();
        Collections.addAll(a,1,2,3,66,77,33);//Collections工具类，添加集合元素
        System.out.println(a);
        System.out.println(Collections.max(a));//最大
        System.out.println(Collections.min(a));//最小
        Collections.reverse(a);//集合位置反转
        System.out.println(a);
        Collections.swap(a,2,3);//集合位置交换
        System.out.println(a);
        Collections.sort(a);//集合排序
        System.out.println(a);
        Collections.addAll(b,0,0,0,0,0,0);
        Collections.copy(b,a);//复制集合？？？？？？？？？？？
        System.out.println(b);
    }
}
